package hedspi.k55.sm.view;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;

import hedspi.k55.sm.R;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class LoginActivity extends SherlockActivity implements Iview {
	ActionBar actionbar;
	Button btnLogin;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login_activity);
		actionbar = getSupportActionBar();
		btnLogin = (Button) findViewById(R.id.btn_login);
		btnLogin.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent stockDetail = new Intent(LoginActivity.this,
						OverviewActivity.class);
				startActivity(stockDetail);
				finish();
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// TODO Auto-generated method stub
		MenuInflater inflater = getSupportMenuInflater();
		inflater.inflate(R.menu.login_activity, menu);

		return true;
	}

	@Override
	public boolean onOptionsItemSelected(
			com.actionbarsherlock.view.MenuItem item) {
		switch (item.getItemId()) {
		case R.id.login_option_about:
			Intent aboutActivity = new Intent(LoginActivity.this,
					AboutActivity.class);
			startActivity(aboutActivity);

			break;
		case R.id.login_option_forgot_password:
			Toast.makeText(this, "Undercontruction", Toast.LENGTH_SHORT).show();

		case R.id.login_option_help:
			Toast.makeText(this, "Undercontruction", Toast.LENGTH_SHORT).show();
		default:
			break;
		}
		return super.onOptionsItemSelected(item);
	}
}
